{% set variant = hookable_metadata.context.variant|default(null) %}

{% if variant is not null %}
    {% set has_discount = variant|sylius_has_discount({'channel': sylius.channel}) %}
    {% set days = sylius.channel.channelPriceHistoryConfig.lowestPriceForDiscountedProductsCheckingPeriod %}
    {% set has_lowest_price = variant|sylius_has_lowest_price({'channel': sylius.channel}) %}

    <div class="mb-3 pb-1">
        {% hook 'prices' with { variant, has_discount, has_lowest_price, days } %}
    </div>
{% else %}
    <div class="mb-3 pb-1" {{ sylius_test_html_attribute('product-price', 'sylius.ui.unavailable'|trans ) }}>
        {{ 'sylius.ui.unavailable'|trans }}
    </div>
{% endif %}

